<?php

    if (!defined('BASEPATH'))
        exit('No direct script access allowed');

    class maillist extends CI_Controller {

        private $data;

        public function __construct() {

            parent::__construct();

            if (!$this->session->userdata('logged_in'))
                redirect(base_url('login'));
            $this->load->config('languages');
        }

        function view_all() {

            $this->data['title'] = 'Mail list';
            $this->data['page'] = 'Maillist';
            $this->data['all_mails'] = $this->db->get('maillist')->result_array();
            $this->template->load('other/maillist', $this->data);
        }

    }

?>
